<template>
    <div class="box">
        <Myswiper  :banner="banner"  class="swiper"/>
        <div class="center">
            <div class="hide">
                <h3>门店自取</h3>
                <h3>外卖</h3>
            </div>
        </div>
        <div class="bottom">
            <div class="tea">
                <router-link to="/order" tag="p">喜茶百货</router-link>
                <p>阿喜团餐</p>
            </div>
        </div>
        <p class="vip">会员积分:31分</p>
    </div>
</template>

<script>
import axios from 'axios'
import Myswiper from '../../../components/Myswiper.vue'

export default {
    data(){
        return{
            banner : [],
        }
    },
    components : {
        Myswiper
    },
    async mounted(){
        const res = await axios.post('/banner');
        this.banner = res.data;
    },
}
</script>

<style lang="scss" scoped>
    .box{
        background: #eee;
    }
    .swiper{
        width: 375px;
        height: 250px;
    }
    .center{
        width: 100%;
        height: 160px;
        position: relative;
    }
    .hide{
        width: 80%;
        height: 160px;
        position: absolute;
        top: -15px;
        background: #fff;
        border-radius: 10px;
        margin-left: 10%;
        z-index: 99;
        display: flex;
        h3{
            flex: 1;
            text-align: center;
            line-height: 160px;
        }
    }
    .bottom{
        width: 100%;
        height: 100px;
        position: relative;
    }
    .tea{
        display: flex;
        width: 100%;
        justify-content: space-between;
        position: absolute;
        top: 0;
        p{
            width: 50%;
            background: #ccc;
            height: 100px;
            text-align: center;
            line-height: 100px;
            border-radius: 10px;
            margin: 0 15px;
            font-size: 20px;
        }
    }
    .vip{
        line-height: 45px;
        padding: 0 10px;
        background: #fff;
        margin-top: 8px;
    }

</style>